#ifndef __FETCHER_H__
#define __FETCHER_H__

typedef struct _fetcher {
	char * buffer;
	char * filename;
	size_t size;
} FETCHER;

typedef struct _speedinfo {
	int starttime;
	int lasttime;
	double size;
} SPEEDINFO;

FETCHER *fetcher_init();
char *fetcher_get(FETCHER * fetcher, const char * url);
void fetcher_clean(FETCHER * fetcher);

int fetcher_save(const char * url, FILE * desfile, SPEEDINFO *spi);

#endif
